package com.lovo.redis.controller;

import com.lovo.redis.dao.ITicketDao;
import com.lovo.redis.entity.TicketEntity;
import com.lovo.redis.service.ITicketService;
import com.lovo.redis.util.CacheUtil;
import com.lovo.redis.util.SysBloomFilter;
import org.redisson.api.RLock;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.concurrent.TimeUnit;

@RestController
public class TicketController {
    @Autowired
    private ITicketService ticketService;




    @GetMapping("ticketEntityList/{movieName}/{price}")
    public Object ticketEntityList(@PathVariable("movieName")String movieName,
                                   @PathVariable("price")float price) throws InterruptedException {
      return   ticketService.findTicket(movieName,price);
    }
}
